﻿using FS.Common.DotNetBean;
using FS.Common.DotNetCode;
using FS.Common.DotNetUI;
using FS.Business;
using System;
using System.Collections;
using System.Data;

namespace FS.Web.BLL.Visa
{
    public partial class Visa_VisaDetailOKForm : PageBase
    {
        private string _key;
        private visa_dao _visa = new visa_dao();
        protected void Page_Load(object sender, EventArgs e)
        {
            this._key = base.Request["key"];
            if (!base.IsPostBack)
            {
                this.receivedate.Value = DateTime.Now.ToString("yyyy-MM-dd");
                if (!string.IsNullOrEmpty(this._key))
                {
                    this.InitData();
                }
            }
        }

        private void InitData()
        {
            string ls_cus = _visa.GetVisaDetailForm(this._key);
            this.customer.Value = ls_cus;
        }
        protected void Save_Click(object sender, EventArgs e)
        {
            string ls_date = this.receivedate.Value;
                       
            if (_visa.UpdateDetailReceiveDate(this._key, ls_date, _userid,_username,_disname) > 0)
            {
                ShowMsgHelper.AlertMsg("操作成功！");
            }
            else
            {
                ShowMsgHelper.Alert_Error("操作失败！");
            }
        }
    }
}